﻿


/*========================================================================================
//Goodasong -- MySnake
//创建者: 郑雪松
//创建时间：2013年1月14日
//类描述：实体类 BdOperateLog (属性说明自动提取数据库字段的描述信息)
//最后修改者:郑雪松
//最后修改时间:2013年1月14日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.Rights.Model
{
    /// <summary>
    /// 实体类 BdOperateLog (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "BdOperateLog", PrimaryKey = "GID", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class BdOperateLogInfo : BaseModel
    {
        public BdOperateLogInfo()
        {            
            PrimaryKey = "GID"; 
			Fields.Add("GID");//GID
			Fields.Add("MenuName");//操作功能
			Fields.Add("OperateType");//执行操作
			Fields.Add("Content");//数据内容
			Fields.Add("OperateBy");//操作者
			Fields.Add("OperateDate");//操作时间
			Fields.Add("IP");//IP
			Fields.Add("HostName");//HostName
			
			this.OnCreated();			
			this.OnModelCreated();
        }
		public BdOperateLogInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
        }
        #endregion 
		
		#region 成员变量
				
		private Guid _GID;//GID
		private string _MenuName;//操作功能
		private string _OperateType;//执行操作
		private string _Content;//数据内容
		private string _OperateBy;//操作者
		private DateTime? _OperateDate;//操作时间
		private string _IP;//IP
		private string _HostName;//HostName
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// GID
        /// </summary>       
		[ModelField(Description = "GID", Type = typeof(Guid), ErrorMessage = "GID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 16,  DbType = "uniqueidentifier", IsNeedRecordModify = true)]
        public virtual Guid GID
        {
            get
            {
                return this._GID;
            }
            set
            {
                if (_GID != value || (_GID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdOperateLog", "GID", _GID, value, "uniqueidentifier", "GID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnGIDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._GID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnGIDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _GID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 操作功能
        /// </summary>       
		[ModelField(Description = "操作功能", Type = typeof(string), ErrorMessage = "操作功能信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string MenuName
        {
            get
            {
                return this._MenuName;
            }
            set
            {
                if (_MenuName != value || (_MenuName == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdOperateLog", "MenuName", _MenuName, value, "nvarchar", "操作功能");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnMenuNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._MenuName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnMenuNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _MenuName = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 执行操作
        /// </summary>       
		[ModelField(Description = "执行操作", Type = typeof(string), ErrorMessage = "执行操作信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string OperateType
        {
            get
            {
                return this._OperateType;
            }
            set
            {
                if (_OperateType != value || (_OperateType == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdOperateLog", "OperateType", _OperateType, value, "nvarchar", "执行操作");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnOperateTypeChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._OperateType = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnOperateTypeChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _OperateType = value;
                    }
                }
            }
        }


		/// <summary>
        /// 数据内容
        /// </summary>       
		[ModelField(Description = "数据内容", Type = typeof(string), ErrorMessage = "数据内容信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1000,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string Content
        {
            get
            {
                return this._Content;
            }
            set
            {
                if (_Content != value || (_Content == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdOperateLog", "Content", _Content, value, "nvarchar", "数据内容");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnContentChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Content = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnContentChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Content = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 操作者
        /// </summary>       
		[ModelField(Description = "操作者", Type = typeof(string), ErrorMessage = "操作者信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string OperateBy
        {
            get
            {
                return this._OperateBy;
            }
            set
            {
                if (_OperateBy != value || (_OperateBy == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdOperateLog", "OperateBy", _OperateBy, value, "nvarchar", "操作者");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnOperateByChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._OperateBy = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnOperateByChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _OperateBy = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 操作时间
        /// </summary>       
		[ModelField(Description = "操作时间", Type = typeof(DateTime?), ErrorMessage = "操作时间信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime? OperateDate
        {
            get
            {
                return this._OperateDate;
            }
            set
            {
                if (_OperateDate != value || (_OperateDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdOperateLog", "OperateDate", _OperateDate, value, "datetime", "操作时间");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnOperateDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._OperateDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnOperateDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _OperateDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// IP
        /// </summary>       
		[ModelField(Description = "IP", Type = typeof(string), ErrorMessage = "IP信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string IP
        {
            get
            {
                return this._IP;
            }
            set
            {
                if (_IP != value || (_IP == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdOperateLog", "IP", _IP, value, "varchar", "IP");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIPChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IP = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIPChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IP = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// HostName
        /// </summary>       
		[ModelField(Description = "HostName", Type = typeof(string), ErrorMessage = "HostName信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 100,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string HostName
        {
            get
            {
                return this._HostName;
            }
            set
            {
                if (_HostName != value || (_HostName == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdOperateLog", "HostName", _HostName, value, "varchar", "HostName");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnHostNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._HostName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnHostNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _HostName = value;
                    }
                }
            }
        }
		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnGIDChanging(ModifyInfo modifyInfo);//GIDGID改变之前发生
        partial void OnGIDChanged(ModifyInfo modifyInfo);//GIDGID改变之后发生
		partial void OnMenuNameChanging(ModifyInfo modifyInfo);//操作功能MenuName改变之前发生
        partial void OnMenuNameChanged(ModifyInfo modifyInfo);//操作功能MenuName改变之后发生
		partial void OnOperateTypeChanging(ModifyInfo modifyInfo);//执行操作OperateType改变之前发生
        partial void OnOperateTypeChanged(ModifyInfo modifyInfo);//执行操作OperateType改变之后发生
		partial void OnContentChanging(ModifyInfo modifyInfo);//数据内容Content改变之前发生
        partial void OnContentChanged(ModifyInfo modifyInfo);//数据内容Content改变之后发生
		partial void OnOperateByChanging(ModifyInfo modifyInfo);//操作者OperateBy改变之前发生
        partial void OnOperateByChanged(ModifyInfo modifyInfo);//操作者OperateBy改变之后发生
		partial void OnOperateDateChanging(ModifyInfo modifyInfo);//操作时间OperateDate改变之前发生
        partial void OnOperateDateChanged(ModifyInfo modifyInfo);//操作时间OperateDate改变之后发生
		partial void OnIPChanging(ModifyInfo modifyInfo);//IPIP改变之前发生
        partial void OnIPChanged(ModifyInfo modifyInfo);//IPIP改变之后发生
		partial void OnHostNameChanging(ModifyInfo modifyInfo);//HostNameHostName改变之前发生
        partial void OnHostNameChanged(ModifyInfo modifyInfo);//HostNameHostName改变之后发生
		
		#endregion		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		public override void OnLoaded()
        {
            base.OnLoaded();	
			DetailURI = ZModel.InitDetailURI("BdOperateLog", "GID", GID);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("BdOperateLog", "GID", GID);		
			ManageEditURI = ZModel.InitMEditURI("BdOperateLog", "GID", GID);	
		 	ManageDetailURI = ZModel.InitMDetailURI("BdOperateLog", "GID", GID);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}